<template>
  <div>
    <el-container>
      <el-header>
        <a href="http://localhost:8080/#/Index/IndexHome"><img src="../assets/logo.png" style="float: left; margin-left: 10%; height: 60px;"></a>
        <el-menu
      :default-active="activeIndex"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      router
      style="margin-left: 50%;background-color: #00000000;"
    >
      <el-menu-item index="/Index/IndexHome">首页</el-menu-item>
      <el-menu-item index="/Index/order">租床中心</el-menu-item>
      <el-menu-item index="/Index/CustomerModifyInfo">个人信息</el-menu-item>
      <el-menu-item index="/Index/MyOrder">我的订单</el-menu-item>
      <el-menu-item index="/Index/custerPwd">修改密码</el-menu-item>
      <el-menu-item index="/Index/CustomerComplaint">我要反馈</el-menu-item>

      <el-menu-item @click="logout" style="color: #606266; float: right"
        >安全退出</el-menu-item
      >
    </el-menu>
      </el-header>
      <el-main>
        <router-view></router-view>
      </el-main>
      <el-footer>
        西安市未央区第五国际A座    |    100020 |    营业执照<br> © 2019 西安佳陪床位管理有限公司    |    西安ICP备15031018号-1    |    京公网安备 11010502037432号<br>违法和不良信息举报电话：4009515515-0     |     举报邮箱：xyinfo_report@5i5j.com     |     网上有害信息举报
      </el-footer>
    </el-container>



  </div>
</template>

<script>
import { customerLoginout } from "../api/login";
export default {
  data() {
    return {
      activeIndex: "1",
      activeIndex2: "1",
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
    logout() {
      customerLoginout().then((res) => {
        if (res.data.code == 200) {
          this.$message.success(res.data.msg);
          sessionStorage.removeItem("token");
          this.$router.push("/");
        }
      });
    },
    rent() {
      this.$router.push("/Index/order");
    },
  },
};
</script>

<style scoped>
 .el-header, .el-footer {
    background-color: #ffffff;
    color: #000000;
    text-align: center;

  }
  .el-footer{
    color: #8D8B8E;
    background-color: #342F35;
  }

  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
  }

  .el-main {
    /* background-color: #E9EEF3; */
    color: #333;
    text-align: center;
    height: 100ch;
  }

  body > .el-container {
    margin-bottom: 40px;
  }

  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }

  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
  .el-menu-item {
    font-size: 16px;
  }
</style>

